package com.regiee.common;
/*
ThreadLocal工具类，用来保存当前线程所有的一些公共信息
 */
public class BaseContext {
    private static final ThreadLocal<Long> threadLocal=new ThreadLocal<>();
    //将要保存的信息放在线程存储空间中---赋值
    public static void setThreadLocal(Long id){
        threadLocal.set(id);
    }
    //将要用的信息从线程空间中取出来---取值
    public static Long getThreadLocal(){
        return threadLocal.get();
    }
}
